<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
    <head th:fragment="head(title,links,scripts)">
        <title th:replace="${title}">人民大食堂管理系统</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link rel="stylesheet" th:href="@{/static/css/font-awesome-4.7.0/css/font-awesome.css}">
        <link rel="stylesheet" th:href="@{/webjars/bootstrap/4.6.0/css/bootstrap.css}"/>
        <link rel="stylesheet" th:href="@{/static/css/main.css}">
        <th:block th:replace="${links}" />
        <th:block th:replace="${scripts}" />
    </head>

    <nav class="left" th:fragment="left">
        <header>
            <img th:src="@{/static/img/logo.png}">
            <span>食堂管理系统</span>
        </header>
        <nav class="list">
            <ul>
                <li th:class="${#httpServletRequest.requestURI == '/admin/menu' || #httpServletRequest.requestURI == '/admin' ? 'nav-active-li' : ''}">
                    <i class="fa fa-dashboard" title="菜品管理"></i>
                    <a th:href="@{/admin/menu}">菜品管理</a>
                </li>
                <li th:class="${#httpServletRequest.requestURI == '/admin/order' ? 'nav-active-li' : ''}">
                    <i class="fa fa-align-left" title="订单管理"></i>
                    <a th:href="@{/admin/order}">订单管理</a>
                </li>
                <li th:class="${#httpServletRequest.requestURI == '/admin/news' ? 'nav-active-li' : ''}">
                    <i class="fa fa-edit" title="资讯管理"></i>
                    <a th:href="@{/admin/news}">资讯管理</a>
                </li>
                <li th:class="${#httpServletRequest.requestURI == '/admin/user' ? 'nav-active-li' : ''}">
                    <i class="fa fa-comments-o" title="用户管理"></i>
                    <a th:href="@{/admin/user}">用户管理</a>
                </li>
            </ul>
        </nav>
    </nav>

    <nav class="top" th:fragment="top">
        <header>
            <div class="menu"><i class="fa fa-align-justify"></i></div>
            <div class="user-info">
                <div class="user-image">
                    <img th:src="@{/static/img/user.jpg}">
                    <i class="fa fa-caret-down"></i>
                </div>
                <div class="user-child">
                    <span>退出登录</span>
                </div>
            </div>
        </header>
    </nav>
</th:block>
</html>